package com.narunas.shapes;

import com.narunas.paints.SolidColorPaint;

import android.content.Context;
import android.graphics.Canvas;
import android.graphics.Color;
import android.graphics.Paint;
import android.graphics.RadialGradient;
import android.graphics.RectF;
import android.graphics.Shader;
import android.util.AttributeSet;
import android.view.View;
import android.widget.TextView;

public class ChildShapeOval extends View {

	public RectF rec;
	
	public ChildShapeOval(Context context) {
		super(context);
		// TODO Auto-generated constructor stub
		rec = new RectF(0, 0, 100, 100);
		
	}
	
	@Override
    protected void onDraw(Canvas canvas) {
		
		super.onDraw(canvas);
		/*
		SolidColorPaint solid = new SolidColorPaint();
		solid.setColor(Color.GREEN);
		*/
		Paint paint = new Paint();
		paint.setAntiAlias(true);
		paint.setShadowLayer(3, 3, 3, 0xFF000000);
		paint.setColor(Color.BLUE);
		RadialGradient rGrad = new RadialGradient(33, 33, 120, 0xFFededed, 0xFF636363, Shader.TileMode.MIRROR);
		
		//paint.setShader(new RadialGradient(33, 33, 120, 0xFFFFFFFF, 0xFF333333, Shader.TileMode.MIRROR));
		paint.setShader(rGrad);
		paint.setDither(true);
		
		//TextView txt = new TextView();
		//txt.setText("this is a custom View");
		
		canvas.drawOval(new RectF(0, 0, 100, 100), paint);
		//canvas.drawText("this is a custom View", 1.0f,1.0f, new Paint(Color.BLACK));

    }
	
}
